<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<script type="text/javascript" src="http://127.0.0.1/vancl_php/Static/js/jquery-1.7.2.min.js">
	</script>
	<script>
		var ajaxCity = "<?php echo U('ajaxCity');?>";
		var ajaxDist = "<?php echo U('ajaxDist');?>";
		var defaultAddr = "<?php echo U('ReceiveAddr/defaultAddr');?>";
		var editAddr = "<?php echo U('ReceiveAddr/ajaxEditAddr');?>";
		var subEdit = "<?php echo U('ReceiveAddr/subEdit');?>";
		var addAddr = "<?php echo U('ReceiveAddr/addAddr');?>";
		var loading = "http://127.0.0.1/vancl_php/Static/Img/loading.gif";
	</script>
	<script type="text/javascript" src="http://127.0.0.1/vancl_php/Static/js/hdjs.min.js"></script>
	<link rel="stylesheet" href="http://127.0.0.1/vancl_php/Static/css/hdjs.css" />
	<link rel="stylesheet" href="http://127.0.0.1/vancl_php/Application/Index/View/css/confirm.css" />
	<script type="text/javascript" src="http://127.0.0.1/vancl_php/Application/Index/View/js/shopConfirm.js"></script>
	<script type="text/javascript" src="http://127.0.0.1/vancl_php/Application/Index/View/js/city.js"></script>
	<title>购物定确认页面</title>
</head>
<body>
	<div id="content">
		<!--头部-->
		<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<div id="head">
			<!--logo-->
			<a href="<?php echo U('Index/index');?>" class="logo"><img src="http://127.0.0.1/vancl_php/Application/Index/View/Img/vancl-logo.png" alt="" /></a>
			<!--logo-->
			<!--头部右边信息-->
			<div class="topRight">
				<a href="" class="helpcenter" >帮助中心</a>
				<div class="loginout">
					    <?php if(isset($hd['session']['username'])){ ?>
						您好，<?php echo $hd['session']['username'];?>
						<a href="<?php echo U('Login/loginout');?>">退出登录</a>
						｜
						<a href="<?php echo U('Login/index');?>">更换用户</a>
					<?php }else{ ?>
						您好,
						<a href="<?php echo U('Login/index');?>">请您登陆</a>
					<?php } ?>
				</div>

			</div>
			<!--头部右边信息-->
		</div>
		<!--头部结束-->
		
		<!--内容-->
		<div id="confirmContent">
			<!--当前位置面包屑-->
			<div class="location">
				<a href="" class="onemyshopcart" style="color:#333333">1.我的购物车</a>
				<span class="onemyshopcart">2.填写核对信息单</span>
				<span class="onemyshopcart" style="color:#333333" >3.成功提交订单</span>
			</div>
			<!--确认定单主体-->
			<div class="confirmAdds">
				<!--收货地址-->

				<div class="takAddr">
					<h3>
						收货地址：
					</h3>
					<?php foreach ($takeAddr as $key=>$value){?>
					    <?php if($value['is_default']==1){ ?>
					<div class="myaddr">
						<span class="addr"><?php echo $value['address'];?></span>
						<span class="zipcode"><?php echo $value['re_zipcode'];?></span>
						<span class="name">(<?php echo $value['re_name'];?> 收)</span>
						<span class="telphone"><?php echo $value['re_phone'];?></span>
					</div>
					<?php } ?>
					<?php }?>
					<a href="javascript:;" class="changeAddr">[修改]</a>
				</div>
				<div class="otheraddr">
						<ul>
							<?php foreach ($takeAddr as $k=>$v){?>
							<li     <?php if($v['is_default']==1){ ?>class="isdefault"<?php } ?> reid="<?php echo $v['reid'];?>">
								<input type="radio" style="float:left;margin-top:10px;" name="selectAddr"  value="<?php echo $v['reid'];?>"     <?php if($v['is_default']==1){ ?>checked="checked"<?php } ?> />
								<div class="myaddr">
									<span class="addr"><?php echo $v['address'];?></span>
									<span class="zipcode"><?php echo $v['re_zipcode'];?></span>
									<span class="name">(<?php echo $v['re_name'];?> 收)</span>
									<span class="telphone"><?php echo $v['re_phone'];?></span>
								</div>
								<div class="btn">
									    <?php if($v['is_default']!=1){ ?>
										<a href="javascript:;" class="is_default">设置为默认收货地址</a>
									<?php } ?>
									<a href="javascript:;" style="color:#333;" class="editAddr" >编辑</a>
								</div>
							</li>
							<?php }?>
						</ul>
						<!--添加新的收货地址-->
						<div class="addAddress" >
							<form action="javascript:;" id="addAddressForm" method="post">
								<input type="hidden" name="uid" value="<?php echo $hd['session']['uid'];?>"  />
								<div class="form-group">
									<label><b>*</b>收货人:</label>
									<input class="inputText" type="text" name="re_name" placeholder="请输入收货人姓名"  />
								</div>
								<div class="form-group">
									<label><b>*</b>手机号:</label>
									<input class="inputText" type="text" name="re_phone" placeholder="请输入收货人手机号"  />
								</div>
								<div class="form-group">
							<label for="truename"><span style="color:#B81B22">*</span>地 区：</label>
							<div class="se" style="overflow: hidden;padding-left:20px;">
								<!--省份选择-->
								<select id="province" name="prov" style="opacity: 1;border:1px solid cornflowerblue;">
									<option value="0" selected="selected">请选择/省份</option>
									<?php foreach ($prov as $key=>$val){?>
										<option value="<?php echo $val['provid'];?>"     <?php if($area[0]==$val['provid']){ ?>selected="selected"<?php } ?>><?php echo $val['provname'];?></option>
									<?php }?>
								</select>
								<!--城市 -->
								<select style="opacity: 1;border:1px solid cornflowerblue;" name="city" id="city">
									<option value="0" selected="selected">请选择/市级</option>
									<?php foreach ($citys as $k=>$v){?>
										<option value="<?php echo $v['cityid'];?>"     <?php if($area[1]==$v['cityid']){ ?>selected="selected"<?php } ?>><?php echo $v['cityname'];?></option>
									<?php }?>
								</select>
								<!--地区-->
								<select name="dist" style="opacity: 1;border:1px solid cornflowerblue;"  id="dist">
									<option value="0" selected="selected">请选择/县</option>
									<?php foreach ($dists as $k=>$v){?>
										<option value="<?php echo $v['distid'];?>"     <?php if($area[2]==$v['distid']){ ?>selected="selected"<?php } ?>><?php echo $v['dist_name'];?></option>
									<?php }?>
								</select>
								<!--保存所有在地区隐藏表单-->
								<input type="hidden" name="addarea" value="<?php echo $userInfo['addarea'];?>" />
							</div>
						</div>
								<div class="form-group">
									<label><b>*</b>详细地址:</label>
									<input class="inputText" type="text" name="re_address" style="width:500px" placeholder="请输入收货人详细地址"  />
								</div>
								<div class="form-group">
									<label><b>*</b>邮政编码:</label>
									<input class="inputText" type="text" name="re_zipcode" placeholder="请输入邮政编码"  />
								</div>

							</form>
						</div>
						<div class="gotoAddr">
							<a href="javascript:;" id="editBtn">修改</a>
							<a href="javascript:;" id="addrThis">配送到这个地址</a>
							<a href="javascript:;" id="newAddr">新增地址</a>
						</div>
				</div>
				<!--收货方式-->
				<div class="takAddr">
					<h3>
						配送方式：
					</h3>
					<div class="myaddr">
						<span class="express">快递</span>
						<span class="zipday">周一至周日</span>
						<span class="ziptype">假日均可配送</span>
					</div>
					<a href="" class="changeAddr"><!--[修改]--></a>
				</div>
				<!--支付方式-->
				<div class="takAddr">
					<h3>
						支付方式：
					</h3>
					<div class="myaddr">
						<span class="payway">在线支付</span>
					</div>
					<a href="" class="changeAddr"><!--[修改]--></a>
				</div>
			</div>
			<!--确认定单主体结束-->
			<div class="orderof">
				<div class="title">
					<h2>
						商品清单
					</h2>
					<a href="<?php echo U('Cart/index');?>" class="callshopcart">回到购物车，修改产品>></a>
				</div>
				<!--详细订单-->
				<div class="orderofList">
					<table width="950">
						<tr class="title" style="background:#7A7F89;">	 	 	 
							<th width="300">商品名称</th>
							<th>尺码</th>
							<th></th>
							<th>单价</th>
							<th>数量</th>
							<th></th>
							<th>小计</th>
						</tr>
						<?php foreach ($cartGoods['goods'] as $key=>$v){?>
						<tr align="center">
							<td align="left">
								<?php echo $v['name'];?><?php echo $v['options']['combinestr']['0'];?>
							</td>
							<td>
								<?php echo $v['options']['combinestr']['1'];?>
							</td>
							<td>
								
							</td>
							<td>
								￥<?php echo $v['price'];?> 
							</td>
							<td>
								<?php echo $v['num'];?>
							</td>
							<td>
								
							</td>
							<td>
								￥<?php echo $v['total'];?> 
							</td>
						</tr>
						<?php }?>
					</table>
					<!--底部结算-->
				<div class="balance">
					商品金额小计:<span class="proCountPrice">￥<?php echo $countGoods['countMoney'];?></span>
					   +  
					   运费:￥<span class="kuaidi">0.00</span>
					 =  
					  应付: <strong style="color:#B80000">￥</strong> <span class="sum"><?php echo $countGoods['countMoney'];?></span>
				</div>
				<!--底部结算-->
				</div>
			</div>
			<div class="bottombalance">
				<form action="<?php echo U('Cart/subOrder');?>" method="post">
					<!--结算大写-->
					<div class="countBig">
						
						<?php foreach ($selectGoods as $goodsk=>$goodsv){?>
							<input type="hidden" name="orderList[]" value="<?php echo $goodsv;?>" />
						<?php }?>
						<!--收货地址ID-->
						<?php foreach ($takeAddr as $k=>$v){?>
							    <?php if($v['is_default']==1){ ?><input type="hidden" name="addrid" value="<?php echo $v['reid'];?>" /><?php } ?>
						<?php }?>
						您共需要为订单支付：
						<span class="countPriCount">￥<?php echo $countGoods['countMoney'];?></span>
						<input type="hidden" name="goods_count_price" value="<?php echo $countGoods['countMoney'];?>" />
					</div>
					<!--结算按钮-->
					<div class="countBtn">
						<input type="submit" class="submit" value="提交订单" />
					</div>
					</form>
				</div>
				</form>
		</div>
		<!--内容结束-->
		<!--页脚-->
		<div id="foot">
			<div class="copyright">
				Copyright 2007 - 2015 vancl.com All Rights Reserved 京ICP证100557号 京公网安备11010102000579号 出版物经营许可证新出发京批字第直110138号
			</div>
			<div class="gsjImg">
				<a href="" ><img src="http://127.0.0.1/vancl_php/Application/Index/View/img/cert-redlogo.png" alt="" /></a>
				<a href="" ><img src="http://127.0.0.1/vancl_php/Application/Index/View/img/cert-costumeorg.gif" alt="" /></a>
				<a href="" ><img src="http://127.0.0.1/vancl_php/Application/Index/View/img/cert-wsjybzzx.png" alt="" /></a>
			</div>
		</div>
		<!--页脚结束-->
	</div>
</body>
</html>